using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using clf.weighing.entity;

namespace weighing
{
    /// <summary>
    /// 合同信息表
    /// </summary>


    public class ContractVo : BaseVo
    {
        #region Constract
        public Contract mContract;
        public ContractVo(Contract contract)
        {
            mContract = contract;
        }
        #endregion


        #region propertys

        public Int64 Id
        {
            get
            {
                return mContract.id;
            }
            set
            {
                mContract.id = value;
                OnPropertyChanged(this, nameof(Id));
            }
        }

        /// <summary>
        /// 注释:合同编号
        /// 可空:YES
        /// </summary>

        public String Number
        {
            get
            {
                return mContract.number;
            }
            set
            {
                mContract.number = value;
                OnPropertyChanged(this, nameof(Number));
            }
        }

        /// <summary>
        /// 注释:类型(0:其它，1:采购,2:销售,3:内部倒运,4:外来过磅 ,100:未知)
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? Type
        {
            get
            {
                return mContract.type;
            }
            set
            {
                mContract.type = value;
                OnPropertyChanged(this, nameof(Type));
            }
        }

        /// <summary>
        /// 注释:状态：-1作废 ，0：未审核，1已审核
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? Status
        {
            get
            {
                return mContract.status;
            }
            set
            {
                mContract.status = value;
                OnPropertyChanged(this, nameof(Status));
            }
        }

        /// <summary>
        /// 注释:上传状态 0 未传 1 上传
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? UpStatus
        {
            get
            {
                return mContract.upStatus;
            }
            set
            {
                mContract.upStatus = value;
                OnPropertyChanged(this, nameof(UpStatus));
            }
        }


        public Int64? SendCompanyId
        {
            get
            {
                return mContract.sendCompanyId;
            }
            set
            {
                mContract.sendCompanyId = value;
                OnPropertyChanged(this, nameof(SendCompanyId));
            }
        }


        public String SendCompanyName
        {
            get
            {
                return mContract.sendCompanyName;
            }
            set
            {
                mContract.sendCompanyName = value;
                OnPropertyChanged(this, nameof(SendCompanyName));
            }
        }


        public Int64? TranceCompanyId
        {
            get
            {
                return mContract.tranceCompanyId;
            }
            set
            {
                mContract.tranceCompanyId = value;
                OnPropertyChanged(this, nameof(TranceCompanyId));
            }
        }


        public String TranceCompanyName
        {
            get
            {
                return mContract.tranceCompanyName;
            }
            set
            {
                mContract.tranceCompanyName = value;
                OnPropertyChanged(this, nameof(TranceCompanyName));
            }
        }


        public Int64? MaterialId
        {
            get
            {
                return mContract.materialId;
            }
            set
            {
                mContract.materialId = value;
                OnPropertyChanged(this, nameof(MaterialId));
            }
        }


        public String MaterialName
        {
            get
            {
                return mContract.materialName;
            }
            set
            {
                mContract.materialName = value;
                OnPropertyChanged(this, nameof(MaterialName));
            }
        }

        /// <summary>
        /// 注释:所属公司
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int64? AffiliatedCompanyId
        {
            get
            {
                return mContract.affiliatedCompanyId;
            }
            set
            {
                mContract.affiliatedCompanyId = value;
                OnPropertyChanged(this, nameof(AffiliatedCompanyId));
            }
        }


        public DateTime? AddTime
        {
            get
            {
                return mContract.addTime;
            }
            set
            {
                mContract.addTime = value;
                OnPropertyChanged(this, nameof(AddTime));
            }
        }


        public Int64? AddUserId
        {
            get
            {
                return mContract.addUserId;
            }
            set
            {
                mContract.addUserId = value;
                OnPropertyChanged(this, nameof(AddUserId));
            }
        }


        public String AddUserName
        {
            get
            {
                return mContract.addUserName;
            }
            set
            {
                mContract.addUserName = value;
                OnPropertyChanged(this, nameof(AddUserName));
            }
        }


        public DateTime? LastUpdateTime
        {
            get
            {
                return mContract.lastUpdateTime;
            }
            set
            {
                mContract.lastUpdateTime = value;
                OnPropertyChanged(this, nameof(LastUpdateTime));
            }
        }


        public Int32? IsDelete
        {
            get
            {
                return mContract.isDelete;
            }
            set
            {
                mContract.isDelete = value;
                OnPropertyChanged(this, nameof(IsDelete));
            }
        }


        public DateTime? DeleteTime
        {
            get
            {
                return mContract.deleteTime;
            }
            set
            {
                mContract.deleteTime = value;
                OnPropertyChanged(this, nameof(DeleteTime));
            }
        }

        /// <summary>
        /// 注释:删除原因
        /// 可空:YES
        /// </summary>

        public String DeleteReason
        {
            get
            {
                return mContract.deleteReason;
            }
            set
            {
                mContract.deleteReason = value;
                OnPropertyChanged(this, nameof(DeleteReason));
            }
        }


        public Int64? LastUpdateUserId
        {
            get
            {
                return mContract.lastUpdateUserId;
            }
            set
            {
                mContract.lastUpdateUserId = value;
                OnPropertyChanged(this, nameof(LastUpdateUserId));
            }
        }


        public String LastUpdateUserName
        {
            get
            {
                return mContract.lastUpdateUserName;
            }
            set
            {
                mContract.lastUpdateUserName = value;
                OnPropertyChanged(this, nameof(LastUpdateUserName));
            }
        }


        public Int64? ReceiveCompanyId
        {
            get
            {
                return mContract.receiveCompanyId;
            }
            set
            {
                mContract.receiveCompanyId = value;
                OnPropertyChanged(this, nameof(ReceiveCompanyId));
            }
        }


        public String ReceiveCompanyName
        {
            get
            {
                return mContract.receiveCompanyName;
            }
            set
            {
                mContract.receiveCompanyName = value;
                OnPropertyChanged(this, nameof(ReceiveCompanyName));
            }
        }

        /// <summary>
        /// 注释:单价
        /// 可空:NO
        /// 默认值:0.000
        /// </summary>

        public Decimal Price
        {
            get
            {
                return mContract.price;
            }
            set
            {
                mContract.price = value;
                OnPropertyChanged(this, nameof(Price));
            }
        }

        /// <summary>
        /// 注释:总金额
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? TotalMoney
        {
            get
            {
                return mContract.totalMoney;
            }
            set
            {
                mContract.totalMoney = value;
                OnPropertyChanged(this, nameof(TotalMoney));
            }
        }

        /// <summary>
        /// 注释:总吨数
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? TotalTone
        {
            get
            {
                return mContract.totalTone;
            }
            set
            {
                mContract.totalTone = value;
                OnPropertyChanged(this, nameof(TotalTone));
            }
        }

        /// <summary>
        /// 注释:完成吨数
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? FinishedTone
        {
            get
            {
                return mContract.finishedTone;
            }
            set
            {
                mContract.finishedTone = value;
                OnPropertyChanged(this, nameof(FinishedTone));
            }
        }

        /// <summary>
        /// 注释:剩余吨数
        /// 可空:YES
        /// 默认值:0.000
        /// </summary>

        public Decimal? SurplusTone
        {
            get
            {
                return mContract.surplusTone;
            }
            set
            {
                mContract.surplusTone = value;
                OnPropertyChanged(this, nameof(SurplusTone));
            }
        }

        /// <summary>
        /// 注释:审核人
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int64? AuditUserId
        {
            get
            {
                return mContract.auditUserId;
            }
            set
            {
                mContract.auditUserId = value;
                OnPropertyChanged(this, nameof(AuditUserId));
            }
        }

        /// <summary>
        /// 注释:审核人
        /// 可空:YES
        /// </summary>

        public String AuditUserName
        {
            get
            {
                return mContract.auditUserName;
            }
            set
            {
                mContract.auditUserName = value;
                OnPropertyChanged(this, nameof(AuditUserName));
            }
        }

        /// <summary>
        /// 注释:审核时间
        /// 可空:YES
        /// </summary>

        public DateTime? AuditTime
        {
            get
            {
                return mContract.auditTime;
            }
            set
            {
                mContract.auditTime = value;
                OnPropertyChanged(this, nameof(AuditTime));
            }
        }

        #endregion

        #region Text
        /// <summary>
        /// 注释:类型(0:其它，1:采购,2:销售,3:内部倒运,4:外来过磅 ,100:未知) 显示值
        /// 可空:YES
        /// 默认值:0
        /// </summary>
        
        public string TypeText
        {
            get
            {
                switch ((ContractType)Type)
                {
                    case ContractType.Buy:
                        return "采购合同";
                    case ContractType.Sale:
                        return "销售合同";
                    case ContractType.Self:
                        return "内倒合同";
                    case ContractType.Foreign:
                        return "外来合同";
                }
                return "其它合同";
            }
        }


        #endregion

    }
}
